<template>
  <div class="arrival-time">
      <!-- <cube-button @click="showSetDataPicker">Multi-column Picker</cube-button> -->
  </div>
</template>
<script>
// 引入这个页面需要的方法
/* eslint-disable */
const col1Data = [{ text: '到达后', value: '到达后'}]
const col2Data = [{ text: '10', value: '10'}, { text: '20', value: '20' },
  { text: '30', value: '30' }, { text: '40', value: '40' }, { text: '50', value: '50' },
  { text: '60', value: '60' },{ text: '70', value: '70' },{ text: '80', value: '80' },{ text: '90', value: '90' },{ text: '100', value: '100' },{ text: '110', value: '110' },{ text: '120', value: '120' }]
const col3Data = [{ text: '分钟上车', value: '分钟上车'}]
import {mapMutations} from 'vuex'
export default {
  mounted () {
    this.showSetDataPicker()
  },
  methods: {
    showSetDataPicker () {
      this.picker = this.$createPicker({
      // title: 'Use SetData',
      onSelect: (selectedVal, selectedIndex, selectedText) => {
        console.log(selectedVal[1]*6000)
        this.setArrivalInfo(selectedVal[1]*6000)
        this.setShowArrival(false)
      },
      onCancel: () => {
        this.$createToast({
          type: 'correct',
          time: 1000
        })
      }
    })
      this.picker.setData([col1Data, col2Data, col3Data], [0, 0, 0])
      this.picker.show()
    },
    ...mapMutations({
     setArrivalInfo: 'SET_ARRIVALINFO',
     setShowArrival: 'SET_SHOWARRIVAL'
    })
  }
}
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
</style>